build: Add --disable-static-deltas
authorColin Walters <walters@verbum.org>
Thu, 22 Jan 2015 21:19:11 +0000 (16:19 -0500)
committerColin Walters <walters@verbum.org>
Fri, 23 Jan 2015 02:21:34 +0000 (21:21 -0500)
Since they're unstable, we want to allow organizations shipping ostree
now to be future proof against any changes.

configure.ac
src/libostree/ostree-repo-pull.c

index 6c3e41eb2fc487af1973e47af99ae75c38b4edc2..46892fe561b812c0f5e9f69133acf08c4801b29f 100644 (file)
@@ -218,6 +218,15 @@ AS_IF([test "x$found_introspection" = xyes], [
 ], [have_gjs=no])
 AM_CONDITIONAL(BUILDOPT_GJS, test x$have_gjs = xyes)
 
+AC_ARG_ENABLE(static_deltas,
+              AS_HELP_STRING([--enable-static-deltas],
+                             [Enable static delta code (default: yes)]),,
+              [enable_static_deltas=yes])
+AS_IF([test x$enable_static_deltas = xyes], [
+    AC_DEFINE(BUILDOPT_STATIC_DELTAS, 1, [Define if static deltas are enabled])
+])
+AM_CONDITIONAL(BUILDOPT_STATIC_DELTAS, test x$enable_static_deltas = xyes)
+
 AC_CONFIG_FILES([
 Makefile
 doc/Makefile
@@ -236,6 +245,7 @@ echo "
     SELinux:                                      $with_selinux
     libarchive (parse tar files directly):        $with_libarchive
     gpgme (sign commits):                         $with_gpgme
+    static deltas:                                $enable_static_deltas
     documentation:                                $enable_gtk_doc
     gjs-based tests:                              $have_gjs
     dracut:                                       $with_dracut
index b9330012fceba34d3b472004aa0ef2ad0d7e6890..7a19e1403add32f3ce3897b91004237623c79693 100644 (file)
@@ -1965,12 +1965,14 @@ ostree_repo_pull_with_options (OstreeRepo             *self,
                                     &from_revision, error))
         goto out;
 
+#ifdef BUILDOPT_STATIC_DELTAS
       if (from_revision == NULL || g_strcmp0 (from_revision, to_revision) != 0)
         {
           if (!request_static_delta_superblock_sync (pull_data, from_revision, to_revision,
                                                      &delta_superblock, cancellable, error))
             goto out;
         }
+#endif
           
       if (!delta_superblock)
         {